<template>
  <div class="container">
    <common-header :title="title"></common-header>
    <list-tab></list-tab>
   <list-scroll @titleChenge='titleChenge'></list-scroll>
  </div>
</template>

<script>
  import CommonHeader from 'components/Header/CommonHeader.vue';
  import ListScroll from 'components/ScrollWrapper/List.vue';
  import Tab from 'components/Tab/Index.vue';

  export default {
    name: 'List',
    components: {
      'common-header': CommonHeader,
      'list-scroll': ListScroll,
      'list-tab':Tab
    },
    data: function() {
      return {
        title: '列表',
      }
    },
    methods: {
      titleChenge(field) {
        let title = '';
        switch (field) {
          case "view":
            title = '景区列表';
            break;
          case "food":
            title = '美食列表';
            break;
          case "massage":
            title = '按摩列表';
            break;
          case "hotel":
            title = '酒店列表';
            break;
          case "ktv":
            title = 'KTV列表';
            break;
        }
        this.title = title;
      }
    }
  }
</script>

<style lang="scss" scoped="scoped">
</style>
